package com.orphan.marketFront.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.orphan.marketFront.po.Goods;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用作在主菜单显示商品 Mapper 接口
 * </p>
 *
 * @author orphan
 * @since 2021-07-13
 */
public interface GoodsMapper extends BaseMapper<Goods> {
    @Select("SELECT * from t_goods WHERE goodsTag=1 AND promotion=0 and goodsType='手机'")
    List<Goods> getAllGoodsPhone();

    @Select("SELECT * from t_goods WHERE goodsTag=1 AND promotion=0 and goodsType='电视'")
    List<Goods> getAllGoodsTV();

    @Select("SELECT * from t_goods WHERE goodsTag=1 AND promotion=0")
    List<Goods> getAllGoods();
}
